using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;

namespace ConsoleApplication2.Models.Mapping
{
    public class SO_admisionPickMap : EntityTypeConfiguration<SO_admisionPick>
    {
        public SO_admisionPickMap()
        {
            // Primary Key
            this.HasKey(t => t.Current_Admission);

            // Properties
            this.Property(t => t.ID)
                .HasMaxLength(10);

            this.Property(t => t.PATIENT_ID)
                .HasMaxLength(6);

            this.Property(t => t.CASE__)
                .HasMaxLength(15);

            this.Property(t => t.Latin_Name)
                .HasMaxLength(60);

            this.Property(t => t.Arabic_Name)
                .HasMaxLength(40);

            this.Property(t => t.Phones)
                .HasMaxLength(30);

            this.Property(t => t.ADDRESS)
                .HasMaxLength(80);

            this.Property(t => t.Current_Admission)
                .IsRequired()
                .HasMaxLength(5);

            // Table & Column Mappings
            this.ToTable("SO_admisionPick");
            this.Property(t => t.ID).HasColumnName("ID");
            this.Property(t => t.PATIENT_ID).HasColumnName("PATIENT_ID");
            this.Property(t => t.CASE__).HasColumnName("CASE_#");
            this.Property(t => t.Latin_Name).HasColumnName("Latin_Name");
            this.Property(t => t.Arabic_Name).HasColumnName("Arabic_Name");
            this.Property(t => t.Phones).HasColumnName("Phones");
            this.Property(t => t.ADDRESS).HasColumnName("ADDRESS");
            this.Property(t => t.Current_Admission).HasColumnName("Current_Admission");
        }
    }
}
